<?php
/**
 * banner
 * User: yuanxuncheng
 * Date: 2017/1/2
 * Time: 21:45
 */

namespace app\api\controller;

use app\api\model\page\announcement\AddAnnouncement as AddAnnouncementModel;
use app\api\model\page\announcement\GetAnnouncement as GetAnnouncementModel;
use app\library\Error;
use think\Request;

class Announcement
{

    private $addAnnouncementModel;
    private $getAnnouncementModel;

    public function __construct()
    {
        $this->param = Request::instance()->param();
    }

    /**
     * @desc 添加公告通知
     * @return array
     */
    public function addAnnouncement()
    {
        $this->addAnnouncementModel = new AddAnnouncementModel();
        return $this->addAnnouncementModel->excute($this->param);
    }

    /**
     * @desc 获取公告通知
     * @return array
     */
    public function getAnnouncement()
    {
        $this->getAnnouncementModel = new GetAnnouncementModel();
        return $this->getAnnouncementModel->excute($this->param);
    }
}
